package day3;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class ForSum {
    public static void main(String[] args) {
        //5门课求平均分
        String name;
        Scanner in = new Scanner(System.in);
        System.out.println("请输入姓名：");
        name = in.next();
        double total = 0;
        for (int i = 1; i <= 5; i++) {
            System.out.print("请输入成绩：");
//            double s=in.nextDouble();
//            total+=s;
            total += in.nextDouble();
        }
        double avg = total / 5;
        System.out.println(name + "的平均成绩为：" + avg);
    }
}
